3.341 \(\int \frac{\tan ^2(e+f x)}{(a+b \tan ^2(e+f x))^{3/2}} \, dx\)

Optimal. Leaf size=81 \[ \frac{\tan (e+f x)}{f (a-b) \sqrt{a+b \tan ^2(e+f x)}}-\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{3/2}} \]

[Out]

-(ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/((a - b)^(3/2)*f)) + Tan[e + f*x]/((a - b)*f*S
qrt[a + b*Tan[e + f*x]^2])

________________________________________________________________________________________

Rubi [A]  time = 0.1111, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {3670, 471, 377, 203} \[ \frac{\tan (e+f x)}{f (a-b) \sqrt{a+b \tan ^2(e+f x)}}-\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^2/(a + b*Tan[e + f*x]^2)^(3/2),x]

[Out]

-(ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/((a - b)^(3/2)*f)) + Tan[e + f*x]/((a - b)*f*S
qrt[a + b*Tan[e + f*x]^2])

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 471

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(e^(n -
1)*(e*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(n*(b*c - a*d)*(p + 1)), x] - Dist[e^n/(n*(b*c -
 a*d)*(p + 1)), Int[(e*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(m - n + 1) + d*(m + n*(p + q + 1)
+ 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p, -1] && GeQ[n
, m - n + 1] && GtQ[m - n + 1, 0] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{3/2}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\tan (e+f x)}{(a-b) f \sqrt{a+b \tan ^2(e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{(a-b) f}\\ &=\frac{\tan (e+f x)}{(a-b) f \sqrt{a+b \tan ^2(e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{(a-b) f}\\ &=-\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{(a-b)^{3/2} f}+\frac{\tan (e+f x)}{(a-b) f \sqrt{a+b \tan ^2(e+f x)}}\\ \end{align*}

Mathematica [A]  time = 3.18117, size = 154, normalized size = 1.9 \[ \frac{\tan (e+f x) \left ((a-b) \sqrt{\frac{b \tan ^2(e+f x)}{a}+1}+\sqrt{\frac{(b-a) \tan ^2(e+f x)}{a}} \left (a \cot ^2(e+f x)+b\right ) \tanh ^{-1}\left (\frac{\sqrt{\frac{(b-a) \tan ^2(e+f x)}{a}}}{\sqrt{\frac{b \tan ^2(e+f x)}{a}+1}}\right )\right )}{f (a-b)^2 \sqrt{a+b \tan ^2(e+f x)} \sqrt{\frac{b \tan ^2(e+f x)}{a}+1}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^2/(a + b*Tan[e + f*x]^2)^(3/2),x]

[Out]

(Tan[e + f*x]*(ArcTanh[Sqrt[((-a + b)*Tan[e + f*x]^2)/a]/Sqrt[1 + (b*Tan[e + f*x]^2)/a]]*(b + a*Cot[e + f*x]^2
)*Sqrt[((-a + b)*Tan[e + f*x]^2)/a] + (a - b)*Sqrt[1 + (b*Tan[e + f*x]^2)/a]))/((a - b)^2*f*Sqrt[a + b*Tan[e +
 f*x]^2]*Sqrt[1 + (b*Tan[e + f*x]^2)/a])

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 131, normalized size = 1.6 \begin{align*}{\frac{\tan \left ( fx+e \right ) }{fa}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}}+{\frac{b\tan \left ( fx+e \right ) }{a \left ( a-b \right ) f}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}}-{\frac{1}{f \left ( a-b \right ) ^{2}{b}^{2}}\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\tan \left ( fx+e \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^2/(a+b*tan(f*x+e)^2)^(3/2),x)

[Out]

1/f*tan(f*x+e)/a/(a+b*tan(f*x+e)^2)^(1/2)+b*tan(f*x+e)/a/(a-b)/f/(a+b*tan(f*x+e)^2)^(1/2)-1/f/(a-b)^2*(b^4*(a-
b))^(1/2)/b^2*arctan(b^2*(a-b)/(b^4*(a-b))^(1/2)/(a+b*tan(f*x+e)^2)^(1/2)*tan(f*x+e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.13058, size = 686, normalized size = 8.47 \begin{align*} \left [\frac{{\left (b \tan \left (f x + e\right )^{2} + a\right )} \sqrt{-a + b} \log \left (-\frac{{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} - 2 \, \sqrt{b \tan \left (f x + e\right )^{2} + a} \sqrt{-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, \sqrt{b \tan \left (f x + e\right )^{2} + a}{\left (a - b\right )} \tan \left (f x + e\right )}{2 \,{\left ({\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} f \tan \left (f x + e\right )^{2} +{\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} f\right )}}, -\frac{{\left (b \tan \left (f x + e\right )^{2} + a\right )} \sqrt{a - b} \arctan \left (-\frac{\sqrt{b \tan \left (f x + e\right )^{2} + a}}{\sqrt{a - b} \tan \left (f x + e\right )}\right ) - \sqrt{b \tan \left (f x + e\right )^{2} + a}{\left (a - b\right )} \tan \left (f x + e\right )}{{\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} f \tan \left (f x + e\right )^{2} +{\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

[1/2*((b*tan(f*x + e)^2 + a)*sqrt(-a + b)*log(-((a - 2*b)*tan(f*x + e)^2 - 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(-
a + b)*tan(f*x + e) - a)/(tan(f*x + e)^2 + 1)) + 2*sqrt(b*tan(f*x + e)^2 + a)*(a - b)*tan(f*x + e))/((a^2*b -
2*a*b^2 + b^3)*f*tan(f*x + e)^2 + (a^3 - 2*a^2*b + a*b^2)*f), -((b*tan(f*x + e)^2 + a)*sqrt(a - b)*arctan(-sqr
t(b*tan(f*x + e)^2 + a)/(sqrt(a - b)*tan(f*x + e))) - sqrt(b*tan(f*x + e)^2 + a)*(a - b)*tan(f*x + e))/((a^2*b
 - 2*a*b^2 + b^3)*f*tan(f*x + e)^2 + (a^3 - 2*a^2*b + a*b^2)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**2/(a+b*tan(f*x+e)**2)**(3/2),x)

[Out]

Integral(tan(e + f*x)**2/(a + b*tan(e + f*x)**2)**(3/2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (f x + e\right )^{2}}{{\left (b \tan \left (f x + e\right )^{2} + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

integrate(tan(f*x + e)^2/(b*tan(f*x + e)^2 + a)^(3/2), x)